<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>p5_溢出替换为省略号</title>
    <style>
        div{
            background-color: #ff0;
            width: 200px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div>
        Lorem ipsum dolor sit amet, consectetur adipisicing elit. Commodi corporis deserunt eius error expedita facilis libero magnam molestiae necessitatibus nisi nobis possimus quas quasi, quos repellat sequi similique vel velit?
    </div>
</body>
</html>